import fetch from '../fetch.js'
const key = 'c9418e22636c53034f3356a94962d440'

export default {
    // keywords, page
    search(params = {}) { //
        params.key = key
        params.city = '021' // 上海
        return fetch('VITE_AMAP_URL').get('/place/text', params)
    },
    getArea(params = {}) {
        params.key = key
        params.keywords = '上海'
        params.subdistrict = 3
        return fetch('VITE_AMAP_URL').get('/config/district', params)
    }
}
